import { createRouter, createWebHistory } from 'vue-router';
// 导入组件
import LoginVue from "@/views/Login.vue";
import LayoutVue from "@/views/Layout.vue";
import ArticleCategoryVue from '@/views/article/ArticleCategory.vue'
import ArticleManageVue from '@/views/article/ArticleManage.vue'
import UserAvatarVue from '@/views/user/UserAvatar.vue'
import UserInfoVue from '@/views/user/UserInfo.vue'
import UserResetPasswordVue from '@/views/user/UserResetPassword.vue'
import ForeignClassManageVue from '@/views/foreignClass/ForeignClassManage.vue'
import GraduateTeachingManageVue from '@/views/graduateTeaching/GraduateTeachingManage.vue'
import GraduateProjectManageVue from '@/views/graduateProject/GraduateProjectManage.vue' // 新增
import InternshipTeachingManageVue from '@/views/internshipTeaching/InternshipTeachingManage.vue';
import UndergraduateInstructionManageVue from '@/views/undergraduateInstruction/UndergraduateInstructionManage.vue';
import GraduateTrainingManageVue from '@/views/graduateTraining/GraduateTrainingManage.vue';
import WelcomeVue from '@/views/Welcome.vue'; // 新增

// 定义路由关系
const routes = [
  { path: '/login', component: LoginVue },
  { path: '/welcome', component: WelcomeVue }, // 新增
  { path: '/', component: LayoutVue, children: [
      { path: '/article/category', component: ArticleCategoryVue },
      { path: '/article/manage', component: ArticleManageVue },
      { path: '/user/info', component: UserInfoVue },
      { path: '/user/avatar', component: UserAvatarVue },
      { path: '/user/resetPassword', component: UserResetPasswordVue },
      { path: '/foreignClass/manage', component: ForeignClassManageVue },
      { path: '/graduateTeaching/manage', component: GraduateTeachingManageVue },
      { path: '/graduateTraining/manage',component: GraduateTrainingManageVue},
      { path: '/graduateProject/manage', component: GraduateProjectManageVue }, // 新增
      { path: '/internshipTeaching/manage',component: InternshipTeachingManageVue},
      { path: '/undergraduateInstruction/manage',component: UndergraduateInstructionManageVue}
    ]
  }
];

// 创建路由器
const router = createRouter({
  history: createWebHistory(),
  routes: routes
});

// 导出路由
export default router;
